package com.example.testdemo.demos.web.Entity;



import com.alibaba.fastjson2.JSONArray;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.AbstractJsonTypeHandler;
import com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 商品明细表
 */
@Data
@TableName(value = "tab_order_details",autoResultMap = true)
public class OrderDetails implements Serializable {
    @TableId(type = IdType.AUTO)
    private Integer id;
    private String orderId; // 订单id
    private String goodsId; // 商品id
    private String userId; // 下单用户id
    private String goodsName; // 商品名称
    private String goodsCode; // 商品编码
    private Double price; // 商品价格
    private Integer quantity; // 商品数量
    private String description; // 商品描述
    @TableField(typeHandler = FastjsonTypeHandler.class)
    private JSONArray tags; // 商品标签
    @TableField(typeHandler = FastjsonTypeHandler.class)
    private JSONArray discount; // 折扣信息
    private String logisticsStatus; // 物流状态
    @TableField(typeHandler = FastjsonTypeHandler.class)
    private JSONArray logisticsInfo; // 物流信息
    private String orderStatus; // 订单状态
    private String signStatus; // 签收状态
    @TableField(typeHandler = FastjsonTypeHandler.class)
    private JSONArray imageList; // 商品图片
    private String merchantId; // 商家id
    @TableField(typeHandler = FastjsonTypeHandler.class)
    private JSONArray storeImage; // 商家图片
    private String merchantName; // 商家名称
    private String refundId;//退款id
    private Double refundAmount;//退款金额
    private String refundReason;//退款原因
    private String refundStatus;//退款状态
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date refundTime;//退款时间
    private String orderRemaker;//订单备注
}
